1. Field of the Invention
The present invention relates to a position detecting device capable of detecting the position of a movable member in a plane using a magnetoresistive element and a magnet.
2. Description of the Related Art
JP-A-2005-331401, JP-A-2005-69744, and JP-A-2004-69695 disclose position detecting devices each having a magnet and a detector that detects a magnetic field generated from the magnet.
In the disclosed position detecting devices, the detector is provided with an element capable of detecting the intensity of a magnetic field, such as a Hall element, and detects the intensity of magnetic field components orthogonal to a front surface of the magnet, among the magnetic field generated from the front surface of the magnet, thereby detecting the position where the magnet and the detector face each other.
JP-A-2006-276983 discloses a magnetic sensor that detects a magnetic field generated from a circular magnet when the circular magnet moves. The magnetic sensor includes four giant magnetoresistive elements. Among the four giant magnetoresistive elements, two giant magnetoresistive elements detect an X-direction component of the magnetic flux from the magnet, and the other two giant magnetoresistive elements detect a Y-direction component of the magnetic flux from the magnet. Therefore, it is possible to detect the position of the magnet by calculating the difference between variations in the resistance values of the two giant magnetoresistive elements that detect the X-direction component of the magnetic flux, and the difference between variations in the resistance values of the two giant magnetoresistive elements that detect the Y-direction component of the magnetic flux.
In each of the disclosed position detecting devices, the front surface of the magnet is flat, and the detector provided with a detecting element, such as the Hall element or the giant magnetoresistive element, moves in a plane parallel to the front surface of the magnet while maintaining a constant distance from the front surface of the magnet. However, when the detector detects the intensity of the magnetic field generated from the front surface of the magnet, the detection output of the detector is not necessarily changed in proportion to a linear function of the distance from the center of the magnet to the edge thereof. Therefore, there is a limitation in accurately measuring the position where the detector faces the magnet on the basis of the detection output from the detector.
Further, when the detector facing the front surface of the magnet is moved in a narrow range including the center of the magnet, it is easy to obtain the detection output in proportion to the distance from the center of the magnet. However, a variation in the intensity of the magnetic field increases at a position that is distant from the center of the magnet. Therefore, there is a limitation in the detection accuracy of the magnet when the detector is moved in a wide distance range from the center of the magnet.